import request from '@/utils/request'

const prePath = "/evaluate";

//
export function getEvaluateItemCustomizeListPage(data) {
  return request({
    url: prePath + '/evaluateItem/customizeList/page',
    method : 'post',
    data
  })
}
export function getEvaluateItemPage(params) {
  return request({
    url: prePath + '/evaluateItem/page',
    method : 'get',
    params
  })
}
//新增一条数据
export function createEvaluateItem(data) {
  return request({
    url: prePath + '/evaluateItem',
    method : 'post',
    data
  })
}
//新增一条数据
export function updateEvaluateItem(data) {
  return request({
    url: prePath + '/evaluateItem',
    method : 'put',
    data
  })
}
//新增一条数据
export function deleteEvaluateItem(data) {
  return request({
    url: prePath + '/evaluateItem',
    method : 'delete',
    data
  })
}
//新增一条数据
export function getEvaluateItemById(id) {
  return request({
    url: prePath + '/evaluateItem/'+id,
    method : 'get',
  })
}
//评价体系-分页
export function getEvaluateTemplateCustomizeListPage(data) {
  return request({
    url: prePath + '/evaluateTemplate/customizeList/page',
    method : 'post',
    data
  })
}
//评价体系-新增
export function createEvaluateTemplate(data) {
  return request({
    url: prePath + '/evaluateTemplate',
    method : 'post',
    data
  })
}
//评价体系-更新
export function updateEvaluateTemplate(data) {
  return request({
    url: prePath + '/evaluateTemplate',
    method : 'put',
    data
  })
}
//评价体系-删除
export function deleteEvaluateTemplate(data) {
  return request({
    url: prePath + '/evaluateTemplate',
    method : 'delete',
    data
  })
}
//评价体系-查询
export function getEvaluateTemplateById(id) {
  return request({
    url: prePath + '/evaluateTemplate/'+id,
    method : 'get',
  })
}
//评价体系-获取当前机构下，已启动的评价体系
export function getEnabledEvaluateTemplate() {
  return request({
    url: prePath + '/evaluateTemplate/getEnabled',
    method : 'get',
  })
}

//评价体系-获取全部数据
export function getEvaluateTemplateAll(params) {
  return request({
    url: prePath + '/evaluateTemplate/all',
    method : 'get',
    params
  })
}
//评价体系-启用
export function enabledEvaluateTemplate(data) {
  return request({
    url: prePath + '/evaluateTemplate/enabled',
    method : 'post',
    data
  })
}
//评价记录-分页查询
export function getEvaluateRecordPage(params) {
  return request({
    url: prePath + '/evaluateRecord/page',
    method : 'get',
    params
  })
}
//评价记录-新增
export function createEvaluateRecord(data) {
  return request({
    url: prePath + '/evaluateRecord',
    method : 'post',
    data
  })
}
//评价记录-更新
export function updateEvaluateRecord(data) {
  return request({
    url: prePath + '/evaluateRecord',
    method : 'put',
    data
  })
}
//评价记录-删除
export function deleteEvaluateRecord(data) {
  return request({
    url: prePath + '/evaluateRecord',
    method : 'delete',
    data
  })
}
//评价记录-查询
export function getEvaluateRecordById(id) {
  return request({
    url: prePath + '/evaluateRecord/'+id,
    method : 'get',
  })
}
//评价记录-通过条件，获取评价过的供应商
export function selectEvaluatedSupplier(data) {
  return request({
    url: prePath + '/evaluateRecord/selectEvaluatedSupplier',
    method : 'post',
    data
  })
}
//评价记录-批量新增
export function batchInsertEvaluateRecord(data) {
  return request({
    url: prePath + '/evaluateRecord/batchInsert',
    method : 'post',
    data
  })
}
//评价记录-导出excel
export function excelListEvaluateRecord(data) {
  return request({
    url: prePath + '/evaluateRecord/excelList',
    method : 'post',
    data,
    responseType: "blob"
  })
}
//评价记录-打印
export function printEvaluateRecord(data) {
  return request({
    url: prePath + '/evaluateRecord/print',
    method : 'post',
    data,
  })
}